package com.zheng.upms.dao.model;

import java.io.Serializable;
import java.math.BigDecimal;

public class UpmsAgent implements Serializable {
    /**
     * 编号
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     * 名称
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 上级代理
     *
     * @mbg.generated
     */
    private Integer pid;

    /**
     * 代理开始时间
     *
     * @mbg.generated
     */
    private Long stime;

    /**
     * 代理结束时间
     *
     * @mbg.generated
     */
    private Long etime;

    /**
     * 代理区域
     *
     * @mbg.generated
     */
    private String area;

    /**
     * 组织描述
     *
     * @mbg.generated
     */
    private String description;

    /**
     * 数据有效性 0-1
     *
     * @mbg.generated
     */
    private Integer flag;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Long ctime;

    /**
     * 创建用户
     *
     * @mbg.generated
     */
    private String cuser;

    /**
     * 代理类型
     *
     * @mbg.generated
     */
    private Integer agenttype;

    /**
     * 是否使用独立小程序(1,是；0,否)
     *
     * @mbg.generated
     */
    private Integer usethirdapp;

    /**
     * 扣取百分比营业额
     *
     * @mbg.generated
     */
    private BigDecimal rate;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Long getStime() {
        return stime;
    }

    public void setStime(Long stime) {
        this.stime = stime;
    }

    public Long getEtime() {
        return etime;
    }

    public void setEtime(Long etime) {
        this.etime = etime;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public Long getCtime() {
        return ctime;
    }

    public void setCtime(Long ctime) {
        this.ctime = ctime;
    }

    public String getCuser() {
        return cuser;
    }

    public void setCuser(String cuser) {
        this.cuser = cuser;
    }

    public Integer getAgenttype() {
        return agenttype;
    }

    public void setAgenttype(Integer agenttype) {
        this.agenttype = agenttype;
    }

    public Integer getUsethirdapp() {
        return usethirdapp;
    }

    public void setUsethirdapp(Integer usethirdapp) {
        this.usethirdapp = usethirdapp;
    }

    public BigDecimal getRate() {
        return rate;
    }

    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", pid=").append(pid);
        sb.append(", stime=").append(stime);
        sb.append(", etime=").append(etime);
        sb.append(", area=").append(area);
        sb.append(", description=").append(description);
        sb.append(", flag=").append(flag);
        sb.append(", ctime=").append(ctime);
        sb.append(", cuser=").append(cuser);
        sb.append(", agenttype=").append(agenttype);
        sb.append(", usethirdapp=").append(usethirdapp);
        sb.append(", rate=").append(rate);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UpmsAgent other = (UpmsAgent) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getStime() == null ? other.getStime() == null : this.getStime().equals(other.getStime()))
            && (this.getEtime() == null ? other.getEtime() == null : this.getEtime().equals(other.getEtime()))
            && (this.getArea() == null ? other.getArea() == null : this.getArea().equals(other.getArea()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getFlag() == null ? other.getFlag() == null : this.getFlag().equals(other.getFlag()))
            && (this.getCtime() == null ? other.getCtime() == null : this.getCtime().equals(other.getCtime()))
            && (this.getCuser() == null ? other.getCuser() == null : this.getCuser().equals(other.getCuser()))
            && (this.getAgenttype() == null ? other.getAgenttype() == null : this.getAgenttype().equals(other.getAgenttype()))
            && (this.getUsethirdapp() == null ? other.getUsethirdapp() == null : this.getUsethirdapp().equals(other.getUsethirdapp()))
            && (this.getRate() == null ? other.getRate() == null : this.getRate().equals(other.getRate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getStime() == null) ? 0 : getStime().hashCode());
        result = prime * result + ((getEtime() == null) ? 0 : getEtime().hashCode());
        result = prime * result + ((getArea() == null) ? 0 : getArea().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getFlag() == null) ? 0 : getFlag().hashCode());
        result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
        result = prime * result + ((getCuser() == null) ? 0 : getCuser().hashCode());
        result = prime * result + ((getAgenttype() == null) ? 0 : getAgenttype().hashCode());
        result = prime * result + ((getUsethirdapp() == null) ? 0 : getUsethirdapp().hashCode());
        result = prime * result + ((getRate() == null) ? 0 : getRate().hashCode());
        return result;
    }
}